package top.wintp.offlinedataanalysis.anlyser.domain;

import java.io.Serializable;

/**
 * stats_device_location
 * @author 
 */
public class StatsDeviceLocationKey implements Serializable {
    private Integer platformDimensionId;

    private Integer dateDimensionId;

    private Integer locationDimensionId;

    private static final long serialVersionUID = 1L;

    public Integer getPlatformDimensionId() {
        return platformDimensionId;
    }

    public void setPlatformDimensionId(Integer platformDimensionId) {
        this.platformDimensionId = platformDimensionId;
    }

    public Integer getDateDimensionId() {
        return dateDimensionId;
    }

    public void setDateDimensionId(Integer dateDimensionId) {
        this.dateDimensionId = dateDimensionId;
    }

    public Integer getLocationDimensionId() {
        return locationDimensionId;
    }

    public void setLocationDimensionId(Integer locationDimensionId) {
        this.locationDimensionId = locationDimensionId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        StatsDeviceLocationKey other = (StatsDeviceLocationKey) that;
        return (this.getPlatformDimensionId() == null ? other.getPlatformDimensionId() == null : this.getPlatformDimensionId().equals(other.getPlatformDimensionId()))
            && (this.getDateDimensionId() == null ? other.getDateDimensionId() == null : this.getDateDimensionId().equals(other.getDateDimensionId()))
            && (this.getLocationDimensionId() == null ? other.getLocationDimensionId() == null : this.getLocationDimensionId().equals(other.getLocationDimensionId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPlatformDimensionId() == null) ? 0 : getPlatformDimensionId().hashCode());
        result = prime * result + ((getDateDimensionId() == null) ? 0 : getDateDimensionId().hashCode());
        result = prime * result + ((getLocationDimensionId() == null) ? 0 : getLocationDimensionId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", platformDimensionId=").append(platformDimensionId);
        sb.append(", dateDimensionId=").append(dateDimensionId);
        sb.append(", locationDimensionId=").append(locationDimensionId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}